import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AccountInfoComponent } from './accountInfo/accountInfo';
import { GGAddComponent } from './index/add';
import { HomeComponent } from './index/home';

const routes: Routes = [
	{
		path: '',
		children: [
			{
				path: '',
				redirectTo: 'index',
			},
			{
				path: 'index',
				component: HomeComponent,
				data: {
					title: '首页',
					url: 'home/index',
				},
				children: [
					
				],
			},
			{
				path: 'add',
				component: GGAddComponent,
				data: {
					title: '添加公告',
					url: 'home/index/add',
				},
			},
			{
				path: 'account',
				component: AccountInfoComponent,
				data: {
					title: '首页',
					url: 'home/account',
				},
			},
		],
	},
];

@NgModule({
	imports: [RouterModule.forChild(routes)],
	exports: [RouterModule],
})
export class HomeRoutingModule {}
